Field of the Invention
The present invention relates to an image processing apparatus and image processing method for observation or monitoring using pictures.
Description of the Related Art
When detecting the passage of an object or human body through a specific portion in a screen by using a picture obtained from a surveillance camera or the like, a conventional technique tracks the object or human body detected from the picture within the screen and detects the passage through the specific portion.
There is known a conventional technique of detecting an object from motion vectors, estimating a search position in the next frame, and tracking the object by template matching (for example, Japanese Patent Laid-Open No. 2002-373332). There is also known a technique as a conventional example, which performs face tracking based on motion information detected from the correlation between a current frame and a past frame (for example, Japanese Patent Laid-Open No. 2010-50934). It is possible to determine the passage of an object through a specific portion based on this tracking result. In general, when performing passage detection, the passage of an object is determined by detecting that a tracking line, which is the locus of object tracking, intersects with a set determination line segment or determination region frame.
When, however, a passage detection line is set near the upper and lower ends or the left and right ends within an imaging screen, even an object which has passed over the passage detection line cannot be detected sometimes. Assume the use of a scheme of tracking a tracking position in an object to be detected on an object barycenter basis, when detecting an object moving from outside to inside a screen. In this case, in the first image which depicts an object which has entered the screen, the barycentric position has already been located inside the set detection line and has passed it. This is because when the object appears in the imaging screen, the barycentric position has already been located inwardly from the screen by several pixels. For this reason, in this case, the tracking line of the barycentric position does not intersect with the passage detection determination line, and hence the passage of the object cannot be detected. This phenomenon is especially noticeable for a fast object.
The following is another example of inability to detect passage. When an object is located at the position of a screen end, it is not possible to determine the moving direction of the object in the image captured for the first time. This makes it impossible sometimes to detect the passage of the object.
On the other hand, it is possible to set a detection method of determining the passage of an object to be detected when part of the object comes into contact with a detection line instead of the barycenter of the object. This can avoid the above detection omission, but may cause false detection. For example, when, in fact, an object has just passed nearby a detection line although part of the object has touched the line, false detection occurs because the object has not actually moved across the detection line. For this reason, the passage of an object is generally detected by tracking the barycenter of the object or the midpoint of a diagonal line of the object and using the intersection between it and a detection line.
When settings are made to inhibit the detection of any object having a specific size or less upon filtering the size of each object to be detected, part of the object falls outside the screen at a screen end. For this reason, the apparent size of the object to be detected decreases on the screen, and the object is excluded from detection at the time of filtering. This may lead to detection omission.